using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class huqiang_Communication_KcpServer_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(huqiang.Communication.KcpServer);
            args = new Type[]{typeof(System.Int32), typeof(System.Int32)};
            method = type.GetMethod("Run", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Run_0);
            args = new Type[]{};
            method = type.GetMethod("Close", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Close_1);
            args = new Type[]{typeof(System.Net.IPEndPoint)};
            method = type.GetMethod("FindOrCreateLink", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, FindOrCreateLink_2);
            args = new Type[]{typeof(System.Byte[]), typeof(System.Int32), typeof(System.Net.IPEndPoint)};
            method = type.GetMethod("Dispatch", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Dispatch_3);
            args = new Type[]{typeof(huqiang.Communication.NetworkLink)};
            method = type.GetMethod("RemoveLink", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, RemoveLink_4);
            args = new Type[]{};
            method = type.GetMethod("Dispose", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Dispose_5);
            args = new Type[]{typeof(System.Int64)};
            method = type.GetMethod("FindLink", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, FindLink_6);
            args = new Type[]{typeof(System.Int32), typeof(System.Int32)};
            method = type.GetMethod("FindLink", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, FindLink_7);
            args = new Type[]{};
            method = type.GetMethod("OpenHeart", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, OpenHeart_8);
            args = new Type[]{};
            method = type.GetMethod("CloseHeart", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, CloseHeart_9);
            args = new Type[]{typeof(System.Byte[]), typeof(System.Int32)};
            method = type.GetMethod("PostBroadcast", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, PostBroadcast_10);
            args = new Type[]{typeof(System.Int32)};
            method = type.GetMethod("FindBroadcastMsg", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, FindBroadcastMsg_11);
            args = new Type[]{typeof(System.Int32)};
            method = type.GetMethod("UpdateBroadcastMsg", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, UpdateBroadcastMsg_12);
            args = new Type[]{};
            method = type.GetMethod("SendAll", flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, SendAll_13);

            field = type.GetField("CreateNew", flag);
            app.RegisterCLRFieldGetter(field, get_CreateNew_0);
            app.RegisterCLRFieldSetter(field, set_CreateNew_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_CreateNew_0, AssignFromStack_CreateNew_0);
            field = type.GetField("Whitelist", flag);
            app.RegisterCLRFieldGetter(field, get_Whitelist_1);
            app.RegisterCLRFieldSetter(field, set_Whitelist_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_Whitelist_1, AssignFromStack_Whitelist_1);
            field = type.GetField("Blacklist", flag);
            app.RegisterCLRFieldGetter(field, get_Blacklist_2);
            app.RegisterCLRFieldSetter(field, set_Blacklist_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_Blacklist_2, AssignFromStack_Blacklist_2);
            field = type.GetField("MinID", flag);
            app.RegisterCLRFieldGetter(field, get_MinID_3);
            app.RegisterCLRFieldSetter(field, set_MinID_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_MinID_3, AssignFromStack_MinID_3);
            field = type.GetField("MaxID", flag);
            app.RegisterCLRFieldGetter(field, get_MaxID_4);
            app.RegisterCLRFieldSetter(field, set_MaxID_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_MaxID_4, AssignFromStack_MaxID_4);
            field = type.GetField("SendTime", flag);
            app.RegisterCLRFieldGetter(field, get_SendTime_5);
            app.RegisterCLRFieldSetter(field, set_SendTime_5);
            app.RegisterCLRFieldBinding(field, CopyToStack_SendTime_5, AssignFromStack_SendTime_5);
            field = type.GetField("MsgTimeOut", flag);
            app.RegisterCLRFieldGetter(field, get_MsgTimeOut_6);
            app.RegisterCLRFieldSetter(field, set_MsgTimeOut_6);
            app.RegisterCLRFieldBinding(field, CopyToStack_MsgTimeOut_6, AssignFromStack_MsgTimeOut_6);
            field = type.GetField("AllowFileTransfer", flag);
            app.RegisterCLRFieldGetter(field, get_AllowFileTransfer_7);
            app.RegisterCLRFieldSetter(field, set_AllowFileTransfer_7);
            app.RegisterCLRFieldBinding(field, CopyToStack_AllowFileTransfer_7, AssignFromStack_AllowFileTransfer_7);
            field = type.GetField("RejectAutoConnections", flag);
            app.RegisterCLRFieldGetter(field, get_RejectAutoConnections_8);
            app.RegisterCLRFieldSetter(field, set_RejectAutoConnections_8);
            app.RegisterCLRFieldBinding(field, CopyToStack_RejectAutoConnections_8, AssignFromStack_RejectAutoConnections_8);


            app.RegisterCLRCreateDefaultInstance(type, () => new huqiang.Communication.KcpServer());
            app.RegisterCLRCreateArrayInstance(type, s => new huqiang.Communication.KcpServer[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }


        static StackObject* Run_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @userBuffer = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 @port = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Run(@port, @userBuffer);

            return __ret;
        }

        static StackObject* Close_1(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Close();

            return __ret;
        }

        static StackObject* FindOrCreateLink_2(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Net.IPEndPoint @ep = (System.Net.IPEndPoint)typeof(System.Net.IPEndPoint).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.FindOrCreateLink(@ep);

            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static StackObject* Dispatch_3(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 4);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Net.IPEndPoint @endPoint = (System.Net.IPEndPoint)typeof(System.Net.IPEndPoint).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 @len = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            System.Byte[] @dat = (System.Byte[])typeof(System.Byte[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 4);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Dispatch(@dat, @len, @endPoint);

            return __ret;
        }

        static StackObject* RemoveLink_4(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Communication.NetworkLink @link = (huqiang.Communication.NetworkLink)typeof(huqiang.Communication.NetworkLink).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.RemoveLink(@link);

            return __ret;
        }

        static StackObject* Dispose_5(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Dispose();

            return __ret;
        }

        static StackObject* FindLink_6(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int64 @id = *(long*)&ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.FindLink(@id);

            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static StackObject* FindLink_7(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @port = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Int32 @ip = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.FindLink(@ip, @port);

            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static StackObject* OpenHeart_8(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.OpenHeart();

            return __ret;
        }

        static StackObject* CloseHeart_9(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.CloseHeart();

            return __ret;
        }

        static StackObject* PostBroadcast_10(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @spin = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            System.Byte[] @dat = (System.Byte[])typeof(System.Byte[]).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.PostBroadcast(@dat, @spin);

            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static StackObject* FindBroadcastMsg_11(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @msgID = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            var result_of_this_method = instance_of_this_method.FindBroadcastMsg(@msgID);

            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static StackObject* UpdateBroadcastMsg_12(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 2);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            System.Int32 @msgID = ptr_of_this_method->Value;

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.UpdateBroadcastMsg(@msgID);

            return __ret;
        }

        static StackObject* SendAll_13(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* ptr_of_this_method;
            StackObject* __ret = ILIntepreter.Minus(__esp, 1);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            huqiang.Communication.KcpServer instance_of_this_method = (huqiang.Communication.KcpServer)typeof(huqiang.Communication.KcpServer).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.SendAll();

            return __ret;
        }


        static object get_CreateNew_0(ref object o)
        {
            return ((huqiang.Communication.KcpServer)o).CreateNew;
        }

        static StackObject* CopyToStack_CreateNew_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Communication.KcpServer)o).CreateNew;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_CreateNew_0(ref object o, object v)
        {
            ((huqiang.Communication.KcpServer)o).CreateNew = (System.Func<huqiang.Communication.KcpLink>)v;
        }

        static StackObject* AssignFromStack_CreateNew_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Func<huqiang.Communication.KcpLink> @CreateNew = (System.Func<huqiang.Communication.KcpLink>)typeof(System.Func<huqiang.Communication.KcpLink>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)8);
            ((huqiang.Communication.KcpServer)o).CreateNew = @CreateNew;
            return ptr_of_this_method;
        }

        static object get_Whitelist_1(ref object o)
        {
            return huqiang.Communication.KcpServer.Whitelist;
        }

        static StackObject* CopyToStack_Whitelist_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Communication.KcpServer.Whitelist;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Whitelist_1(ref object o, object v)
        {
            huqiang.Communication.KcpServer.Whitelist = (System.Collections.Generic.List<System.Int32>)v;
        }

        static StackObject* AssignFromStack_Whitelist_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Collections.Generic.List<System.Int32> @Whitelist = (System.Collections.Generic.List<System.Int32>)typeof(System.Collections.Generic.List<System.Int32>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            huqiang.Communication.KcpServer.Whitelist = @Whitelist;
            return ptr_of_this_method;
        }

        static object get_Blacklist_2(ref object o)
        {
            return huqiang.Communication.KcpServer.Blacklist;
        }

        static StackObject* CopyToStack_Blacklist_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Communication.KcpServer.Blacklist;
            object obj_result_of_this_method = result_of_this_method;
            if(obj_result_of_this_method is CrossBindingAdaptorType)
            {    
                return ILIntepreter.PushObject(__ret, __mStack, ((CrossBindingAdaptorType)obj_result_of_this_method).ILInstance);
            }
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_Blacklist_2(ref object o, object v)
        {
            huqiang.Communication.KcpServer.Blacklist = (System.Collections.Generic.List<System.Int32>)v;
        }

        static StackObject* AssignFromStack_Blacklist_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Collections.Generic.List<System.Int32> @Blacklist = (System.Collections.Generic.List<System.Int32>)typeof(System.Collections.Generic.List<System.Int32>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            huqiang.Communication.KcpServer.Blacklist = @Blacklist;
            return ptr_of_this_method;
        }

        static object get_MinID_3(ref object o)
        {
            return huqiang.Communication.KcpServer.MinID;
        }

        static StackObject* CopyToStack_MinID_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Communication.KcpServer.MinID;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_MinID_3(ref object o, object v)
        {
            huqiang.Communication.KcpServer.MinID = (System.UInt16)v;
        }

        static StackObject* AssignFromStack_MinID_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.UInt16 @MinID = (ushort)ptr_of_this_method->Value;
            huqiang.Communication.KcpServer.MinID = @MinID;
            return ptr_of_this_method;
        }

        static object get_MaxID_4(ref object o)
        {
            return huqiang.Communication.KcpServer.MaxID;
        }

        static StackObject* CopyToStack_MaxID_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Communication.KcpServer.MaxID;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_MaxID_4(ref object o, object v)
        {
            huqiang.Communication.KcpServer.MaxID = (System.UInt16)v;
        }

        static StackObject* AssignFromStack_MaxID_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.UInt16 @MaxID = (ushort)ptr_of_this_method->Value;
            huqiang.Communication.KcpServer.MaxID = @MaxID;
            return ptr_of_this_method;
        }

        static object get_SendTime_5(ref object o)
        {
            return huqiang.Communication.KcpServer.SendTime;
        }

        static StackObject* CopyToStack_SendTime_5(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = huqiang.Communication.KcpServer.SendTime;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_SendTime_5(ref object o, object v)
        {
            huqiang.Communication.KcpServer.SendTime = (System.UInt16)v;
        }

        static StackObject* AssignFromStack_SendTime_5(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.UInt16 @SendTime = (ushort)ptr_of_this_method->Value;
            huqiang.Communication.KcpServer.SendTime = @SendTime;
            return ptr_of_this_method;
        }

        static object get_MsgTimeOut_6(ref object o)
        {
            return ((huqiang.Communication.KcpServer)o).MsgTimeOut;
        }

        static StackObject* CopyToStack_MsgTimeOut_6(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Communication.KcpServer)o).MsgTimeOut;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_MsgTimeOut_6(ref object o, object v)
        {
            ((huqiang.Communication.KcpServer)o).MsgTimeOut = (System.Int32)v;
        }

        static StackObject* AssignFromStack_MsgTimeOut_6(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @MsgTimeOut = ptr_of_this_method->Value;
            ((huqiang.Communication.KcpServer)o).MsgTimeOut = @MsgTimeOut;
            return ptr_of_this_method;
        }

        static object get_AllowFileTransfer_7(ref object o)
        {
            return ((huqiang.Communication.KcpServer)o).AllowFileTransfer;
        }

        static StackObject* CopyToStack_AllowFileTransfer_7(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Communication.KcpServer)o).AllowFileTransfer;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_AllowFileTransfer_7(ref object o, object v)
        {
            ((huqiang.Communication.KcpServer)o).AllowFileTransfer = (System.Boolean)v;
        }

        static StackObject* AssignFromStack_AllowFileTransfer_7(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @AllowFileTransfer = ptr_of_this_method->Value == 1;
            ((huqiang.Communication.KcpServer)o).AllowFileTransfer = @AllowFileTransfer;
            return ptr_of_this_method;
        }

        static object get_RejectAutoConnections_8(ref object o)
        {
            return ((huqiang.Communication.KcpServer)o).RejectAutoConnections;
        }

        static StackObject* CopyToStack_RejectAutoConnections_8(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((huqiang.Communication.KcpServer)o).RejectAutoConnections;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method ? 1 : 0;
            return __ret + 1;
        }

        static void set_RejectAutoConnections_8(ref object o, object v)
        {
            ((huqiang.Communication.KcpServer)o).RejectAutoConnections = (System.Boolean)v;
        }

        static StackObject* AssignFromStack_RejectAutoConnections_8(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Boolean @RejectAutoConnections = ptr_of_this_method->Value == 1;
            ((huqiang.Communication.KcpServer)o).RejectAutoConnections = @RejectAutoConnections;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new huqiang.Communication.KcpServer();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
